<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>温馨提示</title>
    <link rel="stylesheet" href="{:config('app.static_path')}/bootstrap/bootstrap.min.css">
    <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.js"></script>
    <!-- <script src="./asset/bootstrap.js"></script> -->
    <script src="{:config('app.static_path')}/bootstrap/bootstrap.min.js"></script>
</head>
</head>
<body>
<div class="modal" id="myModal" tabindex="-1" data-backdrop="statics" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">温馨提示</h4>
            </div>
            <div class="modal-body">
                <button id="J_btn_url" class="btn btn-default">打开淘宝首页</button>
                <button id="J_btn_withData" class="btn btn-default">打开高德地图搜索页面</button>
                <!--<p style="text-indent: 2em;"><span style="color: gray">支付金额:</span> <span style="color: red;font-size: 25px;"><strong></strong></span></p>-->
                <!--<p>请务必填写交易金额: <span style="color: red;"><strong><strong></strong></strong></span></p>-->
                <!--<p>请在<strong style="color: red;">60</strong>秒内完成付款</p>-->
                <!--<p>多付或少付、超过指定时间支付。将无法完成交易~~!></p>-->
            
            </div>
            <div class="modal-footer">
                <a href="javascript:;" id="jump">跳转</a>
                <a id='links' href="<?php echo $url; ?>" style='display:none;'></a>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
</body>
</html>
<!--<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js"></script>-->
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.inc.min.js"></script>

<script>
    $(function(){
        // dom加载完毕
        var $modal = $('#myModal');
        $modal.modal({backdrop: 'static'});

        // 测试 bootstrap 居中
        var $modal_dialog = $modal.find('.modal-dialog');
        var m_top = ( $(window).height() - $modal_dialog.height() )/2;
        $modal_dialog.css({'margin': m_top + 'px auto'});
    });

    var btnUrl = document.querySelector('#J_btn_url');
    btnUrl.addEventListener('click', function(){
        ap.pushWindow('https://render.alipay.com/p/s/i?scheme=alipayqr%3a%2f%2fplatformapi%2fstartapp%3fsaId%3d10000007%26clientVersion%3d3.7.0.0718%26qrcode%3dhttps%3a%2f%2fqr.alipay.com%2ffkx055811roe8phxodhgy7c');
    });
    
</script>
    

    
    // $('#jump').click(function(){
    //     // window.open('https://render.alipay.com/p/s/i?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FsaId%3D10000007%26qrcode%3Dhttps%3A%2F%2Fqr.alipay.com%2Ffkx03221oj4ktpkktgopq78')
    //     // window.location = '/timeout/'
    //     var obj = document.getElementById('links');
    //     window.open(obj.href);
    //     // obj.click();
    //     // var e = document.createEvent('MouseEvent');
    //     // e.initEvent('click', false, false);
    //     // document.getElementById("links").dispatchEvent(e);
    // })
    
</script>